<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Customer_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_id" data-rule="required" data-source="clothmaking_customer/index" data-field="customer_name" class="form-control selectpage" name="row[customer_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Inspection_report_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-inspection_report_id" data-rule="required" data-source="shipment_inspection_report/index" data-field="name" class="form-control selectpage" name="row[inspection_report_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-order_id" data-rule="required" data-source="clothmaking_orders/index" data-field="name" data-multiple="true" class="form-control selectpage" name="row[order_id]" type="text" value="" data-selected="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">客户需求:</label>
        <div class="col-xs-12 col-sm-8">
            <table id="customer-demand-table" class="table table-bordered table-hover" style="display:none;">
                <thead>
                    <tr>
                        <th>产品名称</th>
                                <th>客户名称</th>
                                <th>产品ID</th>
                                <th>客户ID</th>
                        <th>数量</th>
                    </tr>
                </thead>
                <tbody></tbody>
            </table>
            <input type="hidden" id="c-customer_demand_json" name="row[customer_demand_json]">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Salesperson')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-salesperson" data-rule="required" data-source="auth/admin/index" data-field="nickname" class="form-control selectpage" name="row[salesperson]" type="text" value="">
        </div>
    </div>
        <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Prepared_by')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_ids"
                   data-rule="required"
                   data-source="auth/admin/index"
                   data-field="nickname"
                   class="form-control selectpage"
                   name="row[prepared_by]"
                   type="text"
                   value="">
        </div>
    </div>
        <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reviewed_by')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_ids"
                   data-rule="required"
                   data-source="auth/admin/index"
                   data-field="nickname"
                   class="form-control selectpage"
                   name="row[reviewed_by]"
                   type="text"
                   value="">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit" data-rule="required" class="form-control" name="row[unit]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quantity" data-rule="required" class="form-control" step="0.01" name="row[quantity]" type="number">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shipment_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shipment_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[shipment_date]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Delivery_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-delivery_address" data-rule="required" class="form-control " rows="5" name="row[delivery_address]" cols="50"></textarea>
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_tax_included')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-is_tax_included" class="form-control selectpage" data-source="sample_shipment_order/getTaxStatusList" data-field="name" data-primary-key="value" name="row[is_tax_included]" type="text" value="0">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Currency')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-currency" class="form-control" name="row[currency]" type="text" value="CNY">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Exchange_rate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-exchange_rate" class="form-control" step="0.0001" name="row[exchange_rate]" type="number" value="1.0000">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remarks" class="form-control " rows="5" name="row[remarks]" cols="50"></textarea>
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subtotal')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subtotal" class="form-control" step="0.01" name="row[subtotal]" type="number">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tax_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tax_amount" class="form-control" step="0.01" name="row[tax_amount]" type="number">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_amount" class="form-control" step="0.01" name="row[total_amount]" type="number">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="待发货"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
